﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CRM.Business_Object;

namespace CRM
{
    public partial class CustomerAccount : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnCreateCustomer_Click(object sender, EventArgs e)
        {
            CustomerAccountObject cust = new CustomerAccountObject();
            cust.CustomerID = txtCreateCustomerID.Text;
            cust.CustomerName = txtCreateCustomerName.Text;
            cust.BillingAddress = txtCreateBillingAddress.Text;
            cust.ShippingAddress = txtCreateShippingAddress.Text;
            cust.Email = txtCreateEmail.Text;
            cust.ContactNo = txtCreateContactNo.Text;
            cust.Description = txtCreateDescription.Text;
            cust.Gender = ddlCustomerGender.SelectedValue;
            cust.DateOfBirth = CreateDateOfBirthTE.Text;
            CustomerAccountObject.InsertCustomerList(cust);
        }
        protected void btnViewCustomerAccount_Click(object sender,EventArgs e)
        {
            CustomerAccountObject.viewCustomerList();
        }

        protected void btnDeleteCustomerAccount_Click(object sender, EventArgs e)
        {
            CustomerAccountObject.getCustomerAccountById(txtDeleteCustomerID.Text);

        }

        protected void CustomerAccountPageControl_ActiveTabChanged(object source, DevExpress.Web.ASPxTabControl.TabControlEventArgs e)
        {

        }
    }
}